<template>
	<div class="wrapper">
		<div class="dis" v-for="(item,index) in list" :key="index" @click="navUrl(item)">
			<div class="main">
				<div class="dia" style="justify-content: space-between; width: 100%;">
					<div class="">
						{{item.activityName}}
					</div>
					<div class="dis">
						<img src="@/assets/terminal/arrow_right_black.png" alt="" />
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import {
		selectAgentChannelOtherActivity
	} from '@/api/terminal'
	import store from '@/store'
	import {
		showToast
	} from 'vant'
	export default defineComponent({
		name: 'sateActive',
		setup() {
			const router = useRouter()
			const routers = useRoute()
			const state = reactive({
				list: []
			})
			//跳转
			const navUrl = (item) => {
				router.push({
					path: "/degression",
					query: {
						channelCode: routers.query.channelCode,
						serviceNo: routers.query.serviceNo,
						activityId:item.activityId
					}
				})
			}
			//获取活动列表
			const getFindPageList = () => {
				console.log(routers)
				selectAgentChannelOtherActivity({
					channelCode: routers.query.channelCode,
					agentNo: routers.query.serviceNo
				}).then(res => {
					state.list = res.data
				})
			}
			getFindPageList()
			return {
				...toRefs(state),
				getFindPageList,
				navUrl
			}
		}
	})
</script>
<style scoped lang="scss">
	.wrapper {
		background: #F9FBFF;

		.main {
			width: 92%;
			background-color: #fff;
			border-radius: 6px;
			padding: 17px 12px;
			margin-top: 12px;

			img {
				width: 16px;
				height: 16px;
			}
		}
	}
</style>